#include<iostream>
#include<set>
using namespace std;
const int N = 1e5 + 10;
multiset<int> s;
int a[N], b[N];
int n;
int ret = 0;
int main()
{
	cin >> n;
	for (int i = 1;i <= n;i++)
	{
		cin >> a[i];
		s.insert(a[i]);
	}
	for (int i = 1;i <= n;i++)
	{
		cin >> b[i];
	}
	for (int i = 1;i <= n;i++)
	{
		auto p = s.upper_bound(b[i]);
		if (p != s.end())
		{
			s.erase(p);
		}
		else
		{
			ret++;
		}
	}
	cout << ret << endl;
	return 0;
}